package com.cloudfun.campusshare.common.model.dto.kjt;

import com.cloudfun.campusshare.common.constant.KjtWithdrawStatus;
import com.cloudfun.campusshare.util.DateUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.time.format.DateTimeFormatter;

/**
 * Created by Huqin on 2020/8/6
 */
@Data
@ApiModel("快捷通主动提现状态变更通知DTO")
public class KjtSubMerchantWithdrawalCashNotifyDTO extends KjtNotifyBaseDTO {

    /**
     * [32]
     * 平台(商户)订单号，字母数字下划线，确保每笔订单唯一
     */
    @JsonProperty("outer_trade_no")
    private String outTradeNo;

    /**
     * [32]
     * 快捷通订单号
     */
    @JsonProperty("inner_trade_no")
    private String innerTradeNo;

    /**
     * [32]
     * 转账状态
     * WITHDRAWAL_SUCCESS	转账成功
     * WITHDRAWAL_FAIL	转账失败
     * RETURN_TICKET	转账退票
     */
    @JsonProperty("withdrawal_status")
    private KjtWithdrawStatus withdrawalStatus;

    /**
     * [200]
     * 转账描述，该字段不定时每次都会传，请不要拿来做业务判断
     */
    @JsonProperty("fail_reason")
    private String failReason;

    /**
     * [14]
     * 转账时间，转账成功、失败或退票时间，格式：
     * yyyyMMddHHmmss
     */
    @JsonProperty("gmt_withdrawal")
    private String gmtWithdrawal;
    public static final DateTimeFormatter GMT_WITHDRAWAL_FORMATTER = DateUtil.DATE_TIME_FORMATTER_NO_SEP;
}
